module.exports = {
    // 成功返回
    success( data, message = 'success', code = 1,){
        this.status = 200;
        this.body = {
            code,
            data,
            message
        }
    },

    // 失败返回
    fail(message = 'error' ,code = 0,status = 200, data = null){
        this.status = status;
        this.body = {
            code,
            data,
            message
        }
    }
}